﻿///***************************************************************
/// 시  스  템 : Updms.Prj.Dac
/// 단위시스템 : PRJ
/// 계      층 : Data Access Layer
/// 프로그램명 : Prj_Dac_UPDMS_PRJ_REPORT_Prj2010r
/// 파  일  명 : Prj_Dac_UPDMS_PRJ_REPORT_Prj2010r.cs
/// 설      명 : 프로젝트 진척챠트
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2008-08-25 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Runtime.InteropServices;

using SMFramework.Data;

namespace Updms.Prj.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Prj_Dac_UPDMS_PRJ_REPORT_Prj2010r : Base.AppFramework.DacBase
	{
		public Prj_Dac_UPDMS_PRJ_REPORT_Prj2010r()
		{
		}

		#region NT [GetCountByDivNStatus]

		/// <summary>
		/// 프로젝트의 구분/상태별 등록수를 가져온다
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetCountByDivNStatus(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_PRJ_PROGRESS_MGT_Get_Count_By_Div_N_Status";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_PRJ_PROGRESS_MGT", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region NT [GetCompleteRateByPrjId]

		/// <summary>
		/// 전체프로젝트별 완료처리율
		/// </summary>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetCompleteRateByPrjId()
		{
			string strSql = "usp_UPDMS_PRJ_REPORT_Prj2010r_Get_Complete_Rate_By_Prj_Id";

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_PRJ_PROGRESS_MGT", ds, null, CommandType.StoredProcedure);
		}

		#endregion

		#region NT [GetMonthlyCompleteRateByPrjId]
		
		/// <summary>
		/// 완료율(프로젝트별,월별)
		/// </summary>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetMonthlyCompleteRateByPrjId(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_PRJ_REPORT_Prj2010r_Get_Monthly_Complete_Rate_By_Prj_Id";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_PRJ_REPORT", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region NT [GetWeeklyCompleteRateByPrjId]

		/// <summary>
		/// 완료율(프로젝트별,주별)
		/// </summary>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetWeeklyCompleteRateByPrjId(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_PRJ_REPORT_Prj2010r_Get_Weekly_Complete_Rate_By_Prj_Id";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_PRJ_REPORT", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region NT [GetCountByWorkTp]

		/// <summary>
		/// 업무구분별 건수
		/// </summary>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetCountByWorkTp(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_PRJ_REPORT_Prj2010r_Get_Count_By_Work_Tp";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_PRJ_REPORT", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

	}
}
